﻿using System;
using System.Collections.Generic;
using System.Text;

namespace DataService.Core.ServiceDTO
{
    public class ModelColumns
    {
        public long Id { get; set; }
        /// <summary>
        /// 表名（模型表，不含分表标识）
        /// </summary>
        public string TableName { get; set; }
        /// <summary>
        /// 数据库名称/表空间
        /// </summary>
        public string DataBaseName { get; set; }
        /// <summary>
        /// 是否自增
        /// </summary>
        public bool Identity { get; set; }
        /// <summary>
        /// 字段序号
        /// </summary>
        public Int32 ColOrder { get; set; }
        /// <summary>
        /// 字段名
        /// </summary>
        public string ColName { get; set; }
        /// <summary>
        /// 标识
        /// </summary>
        public bool Flag { get; set; }

        /// <summary>
        /// 字段类型
        /// </summary>

        public string ColType { get; set; }
        /// <summary>
        /// 存储长度；占用字节数；一个汉字占用两个字节
        /// </summary>
        public Int32 ColLength { get; set; }

        /// <summary>
        /// 数据长度(字段的最大字符数)；字符长度；数据库定义长度 如decimal(10,2)、varchar(20)。
        /// </summary>
        public Int32 ValueLength { get; set; }
        /// <summary>
        /// 小数位数
        /// </summary>
        public Int32 ScaleLength { get; set; }
        /// <summary>
        /// 允许空；true：可空  false:不可空
        /// </summary>
        public bool IsNullable { get; set; }
        /// <summary>
        /// 默认值
        /// </summary>
        public string DefaultValue { get; set; }
        /// <summary>
        /// 字段说明
        /// </summary>
        public string FieldDes { get; set; }

        /// <summary>
        /// 表名（含分表标识）
        /// </summary>
        public string FullTableName { get; set; }

    }


    public class ModelInitData
    {
        public long Id { get; set; }
        public string DataFields { get; set; }
    }

}
